<%-- 
    Document   : recuperar_paswd
    Created on : 02/08/2008, 11:22:27 AM
    Author     : LIZARDO RIOS
--%>

<%@ page errorPage="../error.jsp?from=recuperar_paswd.jsp" %>
<%@ page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <%
            boolean estilo = false;
            String id = "0";
            String pregunta = "";
            boolean estado = (session.getAttribute("s_olvido_clave") == null) ? false : (Boolean) session.getAttribute("s_olvido_clave");
            
            if (!estado) {
                response.sendRedirect("dinamica/mensaje.jsp?r_msg=Este ID no existe, intentelo otra vez.");
            } else {
                estilo = (request.getAttribute("r_estilo") == null) ? true : false;
                id = (session.getAttribute("s_ID") == null) ? "0" : (String) session.getAttribute("s_ID");
                pregunta = (session.getAttribute("s_pregunta_secreta") == null) ? "" : (String) session.getAttribute("s_pregunta_secreta");
            }
            String servlet = (estilo) ? "../Control" : "Control";
            String cssAdmin = (estilo) ? "../dinamica/css/admin_1.css" : "dinamica/css/admin_1.css";
            String cssAlumno = (estilo) ? "../dinamica/css/alumno.css" : "dinamica/css/alumno.css";
            String imgCabecera = (estilo)? "../dinamica/img/cabeceraIntranet.jpg" : "dinamica/img/cabeceraIntranet.jpg";
            String imgSecurity = (estilo) ? "../dinamica/img/security.png" : "dinamica/img/security.png";
            String imgInfo = (estilo) ? "../dinamica/img/info.gif" : "dinamica/img/info.gif";
                                
        %>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="<%= cssAdmin %>" rel="stylesheet" type="text/css" />
        <link href="<%= cssAlumno %>" rel="stylesheet" type="text/css" />
        
        <title>::Colegio Alexander Graham Bell::</title>
        <script language="JavaScript">
            function validarDatos() {
                respuesta = document.frmRecuperar.txtRespuesta;
                if (respuesta.value == "") {
                    alert("Debe ingresar la respuesta a su pregunta de seguridad.");
                    respuesta.focus();
                    return false;
                } else {
                    return true;
                }    
            }
        </script>
    </head> 
    <body>
        
        <form action="<%= servlet %>" method="post" target="_parent"
              name="frmRecuperar" onsubmit="return validarDatos()">
                    
            <input name="pagina" type="hidden" value="recuperarClave" />
            
            <!--
            <br/><br/>
            <a href="dinamica/mensaje.jsp">ver link</a>
            <br/><br/>
            -->
            <table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F4F4F4" class="tablaprincipal">
                <tr>
                    <td width="948" height="134" valign="top">
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="948" height="134" align="center" valign="top">
                                    <img src="<%= imgCabecera %>" width="948" height="134" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td height="33" valign="top">
                        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="BORDETABLA6">
                            <tr bgcolor="#FFFFFF">
                                <td width="32" height="32" align="center" valign="middle"><img src="dinamica/img/member.jpg" width="24" height="24" /></td>
                                <td width="365" valign="middle" class="txtBase"><span class="txtBase"><strong>USUARIO</strong></span><br />
                                No autenticado </td>
                                <td width="554" align="right" valign="middle">
                                    <font face="arial" size="2">
                                        <a href="Control?pagina=inicio" styleClass="link1"><b>Ir al inicio</b></a>
                                    </font>
                                    &nbsp;&nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td height="0"></td>
                                <td></td>
                                <td></td>
                            </tr>
                            
                        </table>
                    </td>
                </tr>
                <tr>
                    <td height="271" valign="top">
                            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="txtBase">
                                <tr>
                                    <td width="15" rowspan="8" valign="top">&nbsp;</td>
                                    <td height="33" colspan="3" valign="bottom">
                                        <span class="txtAzul">RESPUESTA DE SEGURIDAD</span>
                                    </td>
                                    <td width="731" align="left" valign="bottom">
                                        <img src="<%= imgSecurity %>" width="20" height="20"/>
                                    </td>
                                    <td width="15" rowspan="8" valign="top">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td width="34" height="48" valign="middle" class="BORDETABLA_TOP">
                                        <img src="<%= imgInfo %>" width="21" height="18" />
                                    </td>
                                    <td colspan="3" valign="middle" class="BORDETABLA_TOP">
                                        Por favor ingrese la respuesta correcta a su pregunta de seguridad y haga clic sobre Enviar Respuesta.
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td height="30">&nbsp;</td>
                                    <td width="61">&nbsp;</td>
                                    <td width="92">&nbsp;</td>
                                    <td>&nbsp;</td>
                                </tr>
                                
                                <tr>
                                    <td height="22" colspan="2" valign="top">&nbsp;&nbsp;&nbsp;<strong>ID:</strong></td>
                                    <td colspan="2" valign="top"><%= id%></td>
                                </tr>
                                
                                <tr>
                                    <td height="22" colspan="2" valign="top">&nbsp;&nbsp;&nbsp;<strong>Pregunta:</strong></td>
                                    <td colspan="2" valign="top"><%= pregunta%></td>
                                </tr>
                                
                                <tr>
                                    <td height="22" colspan="2" valign="top">&nbsp;&nbsp;&nbsp;<strong>Respuesta:</strong></td>
                                    <td colspan="2" valign="top">
                                        <input name="txtRespuesta" type="text" size="50" maxlength="50" />
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td height="25" colspan="2" valign="top">&nbsp;</td>
                                    <td colspan="2" valign="bottom">
                                        <a href="javascript:window.history.back()">Retornar</a>
                                        <input name="btnEnvar" type="submit" value="Enviar Repuesta" />
                                        <input name="btnCancelar" type="reset" value="Limpiar" />
                                    </td>
                                </tr>
                                <tr>
                                    <td height="72">&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                </tr>
                            </table>
                    </td>
                </tr>
                <tr>
                    <td height="38" valign="top">
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="948" height="38" align="center" valign="middle" bgcolor="#FFFFFF" class="BORDETABLA1" >
                                    <span class="txtTit2">&nbsp;:: Copyright 2008 &copy; Alexander Graham Bell ::</span>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </form>
    </body>
</html>
